package com.cj.cms.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cj.cms.cache.ChannelArticleCache;
import com.cj.cms.dao.security.TemplateDao;
import com.cj.cms.entity.Template;
import com.cj.common.orm.hibernate.EntityManager;

@Service
@Transactional
public class TemplateManager extends EntityManager<Template, Long> {
	@Autowired
	private TemplateDao templateDao;

	@Transactional(readOnly = true)
	public List<Template> findByTypes(String type){
		return templateDao.findBy("type",type);
	}	
	
	@Override
	protected TemplateDao getEntityDao() {
		return templateDao;
	}
	
	@Override
	protected void afterChange(Long id) {
	}
}
